package com.revzone.demo001.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lsa
 * @since 2025-06-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("logger")
public class Logger implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @TableField("user_name")
    private String userName;

    /**
     * 枚举类型0:insert,1:delete,2:update,3:query
     */
    @TableField("type")
    private Integer type;

    @TableField("class_name")
    private String className;

    @TableField("ip")
    private String ip;

    @TableField("timestamp")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timestamp;

    @TableField("status")
    private String status;

    @TableField("error_message")
    private String errorMessage;

    @TableField("description")
    private String description;

    


}
